<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/view/modules/sys/include/taglib.jsp"%>
<%@ include file="/WEB-INF/view/modules/sys/include/head.jsp"%>
<div class="main-container">
    <div class="padding-md">

<div class="smart-widget">
    <div class="smart-widget-header">
        网站信息管理
        <span class="smart-widget-option">
								<span class="refresh-icon-animated">
									<i class="fa fa-circle-o-notch fa-spin"></i>
								</span>
	                            <a href="#" class="widget-toggle-hidden-option">
	                                <i class="fa fa-cog"></i>
	                            </a>
	                            <a href="#" class="widget-collapse-option" data-toggle="collapse">
	                                <i class="fa fa-chevron-up"></i>
	                            </a>
	                            <a href="#" class="widget-refresh-option">
	                                <i class="fa fa-refresh"></i>
	                            </a>
	                            <a href="#" class="widget-remove-option">
	                                <i class="fa fa-times"></i>
	                            </a>
	                        </span>
    </div>
    <div class="smart-widget-inner">
        <div class="smart-widget-hidden-section">
            <ul class="widget-color-list clearfix">
                <li style="background-color:#20232b;" data-color="widget-dark"></li>
                <li style="background-color:#4c5f70;" data-color="widget-dark-blue"></li>
                <li style="background-color:#23b7e5;" data-color="widget-blue"></li>
                <li style="background-color:#2baab1;" data-color="widget-green"></li>
                <li style="background-color:#edbc6c;" data-color="widget-yellow"></li>
                <li style="background-color:#fbc852;" data-color="widget-orange"></li>
                <li style="background-color:#e36159;" data-color="widget-red"></li>
                <li style="background-color:#7266ba;" data-color="widget-purple"></li>
                <li style="background-color:#f5f5f5;" data-color="widget-light-grey"></li>
                <li style="background-color:#fff;" data-color="reset"></li>
            </ul>
        </div>
        <div class="smart-widget-body">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>id</th>
                    <th>标题</th>
                    <th>关键词</th>
                    <th>描述</th>
                    <th>域名</th>
                    <th>编辑</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach items="${page.list}" var="site">
                    <tr>
                        <td>${site.id}</td>
                        <td>${site.title}</td>
                        <td>${site.keywords}</td>
                        <td>${site.description}</td>
                        <td>${site.domain}</td>
                        <td><a href="${ctx}/site/toupdate?id=${site.id}">编辑</a>
                            |<a href="${ctx}/site/delete?id=${site.id}">删除</a></td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
            <div>
                <ul class="pagination pagination-lg">
                    <li> <%--上一页 hasPreviousPage布尔值是否有上一页，prePage上一页页面--%>
                        <c:if test="${page.hasPreviousPage}">
                            <a href="${ctx}/site/list?pageNum=${page.prePage}&pageSize=${page.pageSize}">«</a>
                        </c:if></li>
                    <%--navigatepageNums 集合所有页码  --%>
                    <c:forEach items="${page.navigatepageNums}" var="nav">
                        <c:if test="${nav == page.pageNum}">
                            <li style="font-weight: bold;"><a href="javascript:;">${nav}</a></li>
                        </c:if>
                        <c:if test="${nav != page.pageNum}">
                            <li><a href="${ctx}/site/list?pageNum=${nav}&pageSize=${page.pageSize}">${nav}</a></li>
                        </c:if>
                    </c:forEach>


                    <%--hasNextPage 布尔值判断是否有下一页 nextPage下一页的页码--%>
                    <c:if test="${page.hasNextPage}">
                        <li><a href="${ctx}/site/list?pageNum=${page.nextPage}&pageSize=${page.pageSize}">»</a></li>
                    </c:if>
                </ul>
            </div>
        </div>
    </div><!-- ./smart-widget-inner -->
</div><!-- ./smart-widget -->
</div>
    </div>
<%@include file="/WEB-INF/view/modules/sys/include/footerlib.jsp"%>


</body>
</html>
